package org.fuys.coder.domain.category.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.category.model.vo
 * @className: CategoryVO
 * @author: WangJing
 * @description: 分类视图 包括id和分类名称
 * @date: 2024/6/25 16:53
 * @version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CategoryVO {
    private Integer id;
    private String name;
    private String description;

    public boolean equals(Object o){
        if(!(o instanceof CategoryVO)){
            return false;
        }
        CategoryVO other=(CategoryVO) o;
        return other.id.equals(this.id) && other.name.equals(this.name);
    }

    public int hashCode(){
        return Objects.hash(id,name);
    }
}
